#ifndef __RENDER_H__
#define __RENDER_H__

#include <vector>

#include <QGLWidget>

#include "vector.h"

namespace Ui {

class Render : public QGLWidget {
Q_OBJECT
public:
	Render(QWidget* _parent = 0);	
	~Render(void);

	QSize minimumSizeHint(void) const;
	QSize sizeHint(void) const;

	void add_points(std::vector<Tujchi::Vector> _points);
	void add_convex_hull(std::vector<Tujchi::Vector> _convex_hull);
	void clear_points(void);
	void clear_convex_hull(void);

	void set_points_visualization(bool option);
	void set_convex_hull_visualization(bool option);
	void set_viewport_scale(int scale);

protected:
	void initializeGL(void);
	void paintGL(void);
	void resizeGL(int width, int height);
private:
	std::vector< std::vector<Tujchi::Vector> > convex_hull;
	std::vector< std::vector<Tujchi::Vector> > points;
	bool convex_hull_visualization;
	bool points_visualization;
	int viewport_scale;
	GLuint convex_object;
};

}
 
#endif

